home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / doom / suckmods.zip / SUCKMODS.ZIP / suck05 / src / defs.qc < prev    next >
Text File  |  1997-05-11  |  23KB  |  896 lines

  1. /*
  2. ==============================================================================
  3.  
  4.             SOURCE FOR GLOBALVARS_T C STRUCTURE
  5.  
  6. ==============================================================================
  7. */
  8.  
  9. //
  10. // system globals
  11. //
  12. entity        self;
  13. entity        other;
  14. entity        world;
  15. float        time;
  16. float        frametime;
  17.  
  18. float        force_retouch;        // force all entities to touch triggers
  19.                     // next frame.  this is needed because
  20.                     // non-moving things don't normally scan
  21.                     // for triggers, and when a trigger is
  22.                     // created (like a teleport trigger), it
  23.                     // needs to catch everything.
  24.                     // decremented each frame, so set to 2
  25.                     // to guarantee everything is touched
  26. string        mapname;
  27.  
  28. float        deathmatch;
  29. float        coop;
  30. float        teamplay;
  31.  
  32. float        serverflags;        // propagated from level to level, used to
  33.                                 // keep track of completed episodes
  34.  
  35. float        total_secrets;
  36. float        total_monsters;
  37.  
  38. float        found_secrets;        // number of secrets found
  39. float        killed_monsters;    // number of monsters killed
  40.  
  41.  
  42. // spawnparms are used to encode information about clients across server
  43. // level changes
  44. float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  45.  
  46. //
  47. // global variables set by built in functions
  48. //    
  49. vector        v_forward, v_up, v_right;    // set by makevectors()
  50.     
  51. // set by traceline / tracebox
  52. float        trace_allsolid;
  53. float        trace_startsolid;
  54. float        trace_fraction;
  55. vector        trace_endpos;
  56. vector        trace_plane_normal;
  57. float        trace_plane_dist;
  58. entity        trace_ent;
  59. float        trace_inopen;
  60. float        trace_inwater;
  61.  
  62. entity        msg_entity;                // destination of single entity writes
  63.  
  64. //
  65. // required prog functions
  66. //
  67. void()         main;                        // only for testing
  68.  
  69. void()        StartFrame;
  70.  
  71. void()         PlayerPreThink;
  72. void()         PlayerPostThink;
  73.  
  74. void()        ClientKill;
  75. void()        ClientConnect;
  76. void()         PutClientInServer;        // call after setting the parm1... parms
  77. void()        ClientDisconnect;
  78.  
  79. void()        SetNewParms;            // called when a client first connects to
  80.                                     // a server. sets parms so they can be
  81.                                     // saved off for restarts
  82.  
  83. void()        SetChangeParms;            // call to set parms for self so they can
  84.                                     // be saved for a level transition
  85.  
  86.  
  87. //================================================
  88. void        end_sys_globals;        // flag for structure dumping
  89. //================================================
  90.  
  91. /*
  92. ==============================================================================
  93.  
  94.             SOURCE FOR ENTVARS_T C STRUCTURE
  95.  
  96. ==============================================================================
  97. */
  98.  
  99. //
  100. // system fields (*** = do not set in prog code, maintained by C code)
  101. //
  102. .float        modelindex;        // *** model index in the precached list
  103. .vector        absmin, absmax;    // *** origin + mins / maxs
  104.  
  105. .float        ltime;            // local time for entity
  106. .float        movetype;
  107. .float        solid;
  108.  
  109. .vector        origin;            // ***
  110. .vector        oldorigin;        // ***
  111. .vector        velocity;
  112. .vector        angles;
  113. .vector        avelocity;
  114.  
  115. .vector        punchangle;        // temp angle adjust from damage or recoil
  116.  
  117. .string        classname;        // spawn function
  118. .string        model;
  119. .float        frame;
  120. .float        skin;
  121. .float        effects;
  122.  
  123. .vector        mins, maxs;        // bounding box extents reletive to origin
  124. .vector        size;            // maxs - mins
  125.  
  126. .void()        touch;
  127. .void()        use;
  128. .void()        think;
  129. .void()        blocked;        // for doors or plats, called when can't push other
  130.  
  131. .float        nextthink;
  132. .entity        groundentity;
  133.  
  134. // stats
  135. .float        health;
  136. .float        frags;
  137. .float        weapon;            // one of the IT_SHOTGUN, etc flags
  138. .string        weaponmodel;
  139. .float        weaponframe;
  140. .float        currentammo;
  141. .float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  142. .float        items;            // bit flags
  143.  
  144. .float        takedamage;
  145. .entity        chain;
  146. .float        deadflag;
  147.  
  148. .vector        view_ofs;            // add to origin to get eye point
  149.  
  150.  
  151. .float        button0;        // fire
  152. .float        button1;        // use
  153. .float        button2;        // jump
  154.  
  155. .float        impulse;        // weapon changes
  156.  
  157. .float        fixangle;
  158. .vector        v_angle;        // view / targeting angle for players
  159. .float        idealpitch;        // calculated pitch angle for lookup up slopes
  160.  
  161.  
  162. .string        netname;
  163.  
  164. .entity     enemy;
  165.  
  166. .float        flags;
  167.  
  168. .float        colormap;
  169. .float        team;
  170.  
  171. .float        max_health;        // players maximum health is stored here
  172.  
  173. .float        teleport_time;    // don't back up
  174.  
  175. .float        armortype;        // save this fraction of incoming damage
  176. .float        armorvalue;
  177.  
  178. .float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  179. .float        watertype;        // a contents value
  180.  
  181. .float        ideal_yaw;
  182. .float        yaw_speed;
  183.  
  184. .entity        aiment;
  185.  
  186. .entity     goalentity;        // a movetarget or an enemy
  187.  
  188. .float        spawnflags;
  189.  
  190. .string        target;
  191. .string        targetname;
  192.  
  193. // damage is accumulated through a frame. and sent as one single
  194. // message, so the super shotgun doesn't generate huge messages
  195. .float        dmg_take;
  196. .float        dmg_save;
  197. .entity        dmg_inflictor;
  198.  
  199. .entity        owner;        // who launched a missile
  200. .vector        movedir;    // mostly for doors, but also used for waterjump
  201.  
  202. .string        message;        // trigger messages
  203.  
  204. .float        sounds;        // either a cd track number or sound number
  205.  
  206. .string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  207.  
  208. //================================================
  209. void        end_sys_fields;            // flag for structure dumping
  210. //================================================
  211.  
  212. /*
  213. ==============================================================================
  214.  
  215.                 VARS NOT REFERENCED BY C CODE
  216.  
  217. ==============================================================================
  218. */
  219.  
  220.  
  221. //
  222. // constants
  223. //
  224.  
  225. float    FALSE                    = 0;
  226. float     TRUE                    = 1;
  227.  
  228. // edict.flags
  229. float    FL_FLY                    = 1;
  230. float    FL_SWIM                    = 2;
  231. float    FL_CLIENT                = 8;    // set for all client edicts
  232. float    FL_INWATER                = 16;    // for enter / leave water splash
  233. float    FL_MONSTER                = 32;
  234. float    FL_GODMODE                = 64;    // player cheat
  235. float    FL_NOTARGET                = 128;    // player cheat
  236. float    FL_ITEM                    = 256;    // extra wide size for bonus items
  237. float    FL_ONGROUND                = 512;    // standing on something
  238. float    FL_PARTIALGROUND        = 1024;    // not all corners are valid
  239. float    FL_WATERJUMP            = 2048;    // player jumping out of water
  240. float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  241.  
  242. // edict.movetype values
  243. float    MOVETYPE_NONE            = 0;    // never moves
  244. //float    MOVETYPE_ANGLENOCLIP    = 1;
  245. //float    MOVETYPE_ANGLECLIP        = 2;
  246. float    MOVETYPE_WALK            = 3;    // players only
  247. float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  248. float    MOVETYPE_FLY            = 5;
  249. float    MOVETYPE_TOSS            = 6;    // gravity
  250. float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  251. float    MOVETYPE_NOCLIP            = 8;
  252. float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  253. float    MOVETYPE_BOUNCE            = 10;
  254. float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  255.  
  256. // edict.solid values
  257. float    SOLID_NOT                = 0;    // no interaction with other objects
  258. float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  259. float    SOLID_BBOX                = 2;    // touch on edge, block
  260. float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  261. float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  262.  
  263. // range values
  264. float    RANGE_MELEE                = 0;
  265. float    RANGE_NEAR                = 1;
  266. float    RANGE_MID                = 2;
  267. float    RANGE_FAR                = 3;
  268.  
  269. // deadflag values
  270.  
  271. float    DEAD_NO                    = 0;
  272. float    DEAD_DYING                = 1;
  273. float    DEAD_DEAD                = 2;
  274. float    DEAD_RESPAWNABLE        = 3;
  275.  
  276. // takedamage values
  277.  
  278. float    DAMAGE_NO                = 0;
  279. float    DAMAGE_YES                = 1;
  280. float    DAMAGE_AIM                = 2;
  281.  
  282. // items
  283. float    IT_AXE                    = 4096;
  284. float    IT_SHOTGUN                = 1;
  285. float    IT_SUPER_SHOTGUN        = 2;
  286. float    IT_NAILGUN                = 4;
  287. float    IT_SUPER_NAILGUN        = 8;
  288. float    IT_GRENADE_LAUNCHER        = 16;
  289. float    IT_ROCKET_LAUNCHER        = 32;
  290. float    IT_LIGHTNING            = 64;
  291. float    IT_EXTRA_WEAPON            = 128;
  292.  
  293. float    IT_SHELLS                = 256;
  294. float    IT_NAILS                = 512;
  295. float    IT_ROCKETS                = 1024;
  296. float    IT_CELLS                = 2048;
  297.  
  298. float    IT_ARMOR1                = 8192;
  299. float    IT_ARMOR2                = 16384;
  300. float    IT_ARMOR3                = 32768;
  301. float    IT_SUPERHEALTH            = 65536;
  302.  
  303. float    IT_KEY1                    = 131072;
  304. float    IT_KEY2                    = 262144;
  305.  
  306. float    IT_INVISIBILITY            = 524288;
  307. float    IT_INVULNERABILITY        = 1048576;
  308. float    IT_SUIT                    = 2097152;
  309. float    IT_QUAD                    = 4194304;
  310. float    IT_HOOK                    = 8388608;
  311.  
  312. // point content values
  313.  
  314. float    CONTENT_EMPTY            = -1;
  315. float    CONTENT_SOLID            = -2;
  316. float    CONTENT_WATER            = -3;
  317. float    CONTENT_SLIME            = -4;
  318. float    CONTENT_LAVA            = -5;
  319. float    CONTENT_SKY                = -6;
  320.  
  321. float    STATE_TOP        = 0;
  322. float    STATE_BOTTOM    = 1;
  323. float    STATE_UP        = 2;
  324. float    STATE_DOWN        = 3;
  325.  
  326. vector    VEC_ORIGIN = '0 0 0';
  327. vector    VEC_HULL_MIN = '-16 -16 -24';
  328. vector    VEC_HULL_MAX = '16 16 32';
  329.  
  330. vector    VEC_HULL2_MIN = '-32 -32 -24';
  331. vector    VEC_HULL2_MAX = '32 32 64';
  332.  
  333. // protocol bytes
  334. float    SVC_TEMPENTITY        = 23;
  335. float    SVC_KILLEDMONSTER    = 27;
  336. float    SVC_FOUNDSECRET        = 28;
  337. float    SVC_INTERMISSION    = 30;
  338. float    SVC_FINALE            = 31;
  339. float    SVC_CDTRACK            = 32;
  340. float    SVC_SELLSCREEN        = 33;
  341.  
  342.  
  343. float    TE_SPIKE        = 0;
  344. float    TE_SUPERSPIKE    = 1;
  345. float    TE_GUNSHOT        = 2;
  346. float    TE_EXPLOSION    = 3;
  347. float    TE_TAREXPLOSION    = 4;
  348. float    TE_LIGHTNING1    = 5;
  349. float    TE_LIGHTNING2    = 6;
  350. float    TE_WIZSPIKE        = 7;
  351. float    TE_KNIGHTSPIKE    = 8;
  352. float    TE_LIGHTNING3    = 9;
  353. float    TE_LAVASPLASH    = 10;
  354. float    TE_TELEPORT        = 11;
  355.  
  356. // sound channels
  357. // channel 0 never willingly overrides
  358. // other channels (1-7) allways override a playing sound on that channel
  359. float    CHAN_AUTO        = 0;
  360. float    CHAN_WEAPON        = 1;
  361. float    CHAN_VOICE        = 2;
  362. float    CHAN_ITEM        = 3;
  363. float    CHAN_BODY        = 4;
  364.  
  365. float    ATTN_NONE        = 0;
  366. float    ATTN_NORM        = 1;
  367. float    ATTN_IDLE        = 2;
  368. float    ATTN_STATIC        = 3;
  369.  
  370. // update types
  371.  
  372. float    UPDATE_GENERAL    = 0;
  373. float    UPDATE_STATIC    = 1;
  374. float    UPDATE_BINARY    = 2;
  375. float    UPDATE_TEMP        = 3;
  376.  
  377. // entity effects
  378.  
  379. float    EF_BRIGHTFIELD    = 1;
  380. float    EF_MUZZLEFLASH     = 2;
  381. float    EF_BRIGHTLIGHT     = 4;
  382. float    EF_DIMLIGHT     = 8;
  383.  
  384.  
  385. // messages
  386. float    MSG_BROADCAST    = 0;        // unreliable to all
  387. float    MSG_ONE            = 1;        // reliable to one (msg_entity)
  388. float    MSG_ALL            = 2;        // reliable to all
  389. float    MSG_INIT        = 3;        // write to the init string
  390.  
  391. //================================================
  392.  
  393. //
  394. // globals
  395. //
  396. float    movedist;
  397. float    gameover;        // set when a rule exits
  398.  
  399. string    string_null;    // null string, nothing should be held here
  400. float    empty_float;
  401.  
  402. entity    newmis;            // launch_spike sets this after spawning it
  403.  
  404. entity    activator;        // the entity that activated a trigger or brush
  405.  
  406. entity    damage_attacker;    // set by T_Damage
  407. float    framecount;
  408.  
  409. float        skill;
  410.  
  411. entity    runespawn;
  412. float    runespawned=0;
  413. float    capturespawned;
  414. float    teamscored;        // non-zero if teams scored
  415.  
  416. //SUCK: This identifies which rune sets are in operation.
  417. float    rune_set_1;
  418. float    rune_set_2;
  419.  
  420. // SUCK: This variable specifies one of two things.  If TEAM_RUNES_RANDOM is
  421. //       set, then this is the number of runes to select at random.  If
  422. //       TEAM_RUNES_GROUP is set, then runes 1 through rune_group_size will
  423. //       be selected to put into the game.
  424. float    rune_group_size = 32;
  425.  
  426.  
  427. float   num_rune_sets   = 3;
  428. //================================================
  429.  
  430. //
  431. // world fields (FIXME: make globals)
  432. //
  433. .string        wad;
  434. .string     map;
  435. .float        worldtype;    // 0=medieval 1=metal 2=base
  436.  
  437. //================================================
  438.  
  439. .string        killtarget;
  440.  
  441. //
  442. // quakeed fields
  443. //
  444. .float        light_lev;        // not used by game, but parsed by light util
  445. .float        style;
  446.  
  447.  
  448. //
  449. // monster ai
  450. //
  451. .void()        th_stand;
  452. .void()        th_walk;
  453. .void()        th_run;
  454. .void()        th_missile;
  455. .void()        th_melee;
  456. .void(entity attacker, float damage)        th_pain;
  457. .void()        th_die;
  458.  
  459. .entity        oldenemy;        // mad at this player before taking damage
  460.  
  461. .float        speed;
  462.  
  463. .float    lefty;
  464.  
  465. .float    search_time;
  466. .float    attack_state;
  467.  
  468. float    AS_STRAIGHT        = 1;
  469. float    AS_SLIDING        = 2;
  470. float    AS_MELEE        = 3;
  471. float    AS_MISSILE        = 4;
  472.  
  473. //
  474. // player only fields
  475. //
  476.  
  477. // *TEAMPLAY*
  478.  
  479. .float          lastteam;       // The last team this player was a member of.
  480.  
  481. .float        walkframe;
  482.  
  483. .float         attack_finished;
  484. .float        pain_finished;
  485. .float        hook_out;
  486.  
  487. .float        invincible_finished;
  488. .float        invisible_finished;
  489. .float        super_damage_finished;
  490. .float        radsuit_finished;
  491.  
  492. .float        invincible_time, invincible_sound;
  493. .float        invisible_time, invisible_sound;
  494. .float        super_time, super_sound;
  495. .float        regeneration_sound;//RUNE: Elder Magic
  496. .float        haste_sound;//RUNE: Hell Magic
  497. .float        rad_time;
  498. .float        fly_sound;
  499.  
  500. //SUCK: All the below are entity fields in use by SuckMods
  501. .float        num_deaths;
  502. .float        num_kills;
  503. .float             rune_num;
  504. .float        trident_time;
  505. .float        rune_time;
  506. .float        rune_pickup_time;
  507. .float        holy;
  508. .float        last_flight_watertype;
  509. .float        grenade_time;
  510. .float        rune_sound_start;
  511. .vector        last_origin;
  512. .float        had_tbolt;
  513.  
  514. // Player shuffle field
  515. .float        shuffle;
  516.  
  517. // Loki
  518. .float        loki_invis;
  519. .float        loki_ghosted;
  520. .entity        lokis_ghost;
  521. .float        loki_possessed;
  522. .entity        loki_possession;
  523. .float        loki_forcevis;
  524.  
  525. // Wendigo
  526. .vector        lock_velocity;
  527. .float        lock_time;
  528.  
  529. // Arthur
  530. .float        regen_rocket; 
  531.  
  532. // Balder
  533. .float        balder_time;
  534. .float        balder_slowdown;
  535.  
  536. // Witch
  537. .float        curse_time;
  538.  
  539. // Golom
  540. .float        stone_time;
  541.  
  542. // Ali Baba
  543. .entity        bulb;
  544.  
  545. // for purging unconnecteds
  546. .float        last_thought;
  547. .float        thought_count;
  548. .float        inc_thought_count;
  549.  
  550. //SUCK: All of these handle passing other messages through the status bar.
  551. .float        msg_pending;
  552. .float        msg_center;
  553. .string        msg_string;
  554. .float        status_time;
  555. .float        bottom_line;
  556.  
  557. .float        displaying_rune_info;
  558.  
  559. //SUCK: For nick registration.
  560. .string     regname;
  561. .float        regcode;
  562. .float        regcodenum;
  563. .float        needsreg;
  564. .float        regstart;
  565. .float        regchecktime;
  566. .float        regtries;
  567.  
  568. //SUCK: The below is to make quake print the _proper_ death messages.
  569. .string        deathweapon;
  570.  
  571.  
  572. // These fields are for runes only.  They are intended to modularize the rune
  573. // code as much as possible, to make it very very easy to add new runes.
  574. .string        rune_msg;
  575. .string        rune_desc;
  576. .void()        rune_init;
  577. .float        rune_init_time;
  578.  
  579. // SUCK: The Runes.
  580.  
  581. // IMPORTANT NOTE.  For TEAM_RUNE_SETS to work, RUNE_NUM_RUNES /must/ be
  582. // an integer multiple of RUNE_SET_SIZE. 
  583. float        RUNE_SET_SIZE = 4;
  584. float        RUNE_NUM_RUNES = 32;
  585. // Rune Set 1 -- The Original Set
  586. float        ITEM_RUNE_RESIST    = 1; 
  587. float        ITEM_RUNE_DBLDMG    = 2; 
  588. float        ITEM_RUNE_HASTE        = 3; 
  589. float        ITEM_RUNE_REGEN        = 4; 
  590. // Rune Set 2 -- The Medieval Set
  591. float        ITEM_RUNE_PRIEST    = 5; 
  592. float        ITEM_RUNE_CASTLE    = 6; 
  593. float        ITEM_RUNE_SIEGE        = 7; 
  594. float        ITEM_RUNE_ARTHUR    = 8; 
  595. // Rune set 3 -- The Dark Ages
  596. float        ITEM_RUNE_VAMPIRE    = 9;  
  597. float        ITEM_RUNE_WEREWOLF    = 10; 
  598. float        ITEM_RUNE_WITCH        = 11; 
  599. float        ITEM_RUNE_VIKING    = 12; 
  600. // Rune Set 4 -- The Hellenic Set
  601. float        ITEM_RUNE_HERMES    = 13; 
  602. float        ITEM_RUNE_VULCAN    = 14; 
  603. float        ITEM_RUNE_MARS        = 15; 
  604. float        ITEM_RUNE_POSEIDON    = 16; 
  605. // Rune Set 5 -- The Norse Set
  606. float        ITEM_RUNE_THOR        = 17; 
  607. float        ITEM_RUNE_LOKI        = 18; 
  608. float        ITEM_RUNE_BALDER    = 19; 
  609. float        ITEM_RUNE_YTR        = 20; 
  610. // Rune Set 6 -- The Japanese Set
  611. float        ITEM_RUNE_NINJA        = 21; 
  612. float        ITEM_RUNE_SAMURAI    = 22; 
  613. float        ITEM_RUNE_MONK        = 23; 
  614. float        ITEM_RUNE_SHOGUN    = 24; 
  615. // Rune Set 7 -- The Arabian Set
  616. float        ITEM_RUNE_IFRITE    = 25; 
  617. float        ITEM_RUNE_SANDSTORM    = 26; 
  618. float        ITEM_RUNE_ALIBABA    = 27; 
  619. float        ITEM_RUNE_KIZI        = 28; 
  620. // Rune Set 8 -- Misc. Set
  621. float        ITEM_RUNE_WENDIGO    = 29; 
  622. float        ITEM_RUNE_GOLOM        = 30; 
  623. float        ITEM_RUNE_SARGON    = 31; 
  624. float        ITEM_RUNE_WIND        = 32;
  625.  
  626. /* The following rune sets are not included in this alpha release, mainly
  627.    because most aren't done.   A future release will include these runes. */
  628. // == Rune Set 9 -- The American Indian Set ==
  629. float        ITEM_RUNE_STORMCROW    = 99; 
  630. // float        ITEM_RUNE_WENDIGO    = 99;
  631. float        ITEM_RUNE_WOLVERINE    = 99;
  632. float        ITEM_RUNE_POCAHONTAS    = 99; 
  633. // == Rune Set 10 -- The Egyptian Set == 
  634. float        ITEM_RUNE_ANKH        = 99;
  635. float        ITEM_RUNE_SET        = 99;
  636. float        ITEM_RUNE_BES        = 99;
  637. float        ITEM_RUNE_ISIS        = 99;
  638. // == Rune Set 11 -- The Judaic Set ==
  639. // float        ITEM_RUNE_GOLOM        = 99;
  640. float        ITEM_RUNE_SHYLOCK    = 99; 
  641. float        ITEM_RUNE_SAMPSON    = 99; 
  642. float        ITEM_RUNE_DAVID        = 99; 
  643. // == Rune Set 12 -- The Celtic Set ==
  644. float        ITEM_RUNE_HERNE        = 99;
  645. float        ITEM_RUNE_MORRIGAN    = 99;
  646. float        ITEM_RUNE_CUCHULIAN    = 99;
  647. float        ITEM_RUNE_DRUID        = 99;
  648. // == Rune Set 13 -- The Babylonian Set ==
  649. // float        ITEM_RUNE_SARGON    = 99;
  650. float        ITEM_RUNE_ESHI        = 99;
  651. float        ITEM_RUNE_BAB3        = 99;
  652. float        ITEM_RUNE_BAB4        = 99; 
  653.  
  654. .float        axhitme;
  655.  
  656. .float        show_hostile;    
  657. .float        rune_notice_time;
  658. .float        jump_flag;        
  659. .float        swim_flag;        
  660. .float        air_finished;    
  661. .float        bubble_count;    
  662. .string        deathtype;    
  663. .float         player_flag;    
  664. .float        score;
  665. .float        staydeadtime;    
  666.  
  667. // ZOID: Capture the flag
  668. float        ITEM_ENEMY_FLAG        = 16;
  669. // TEAMPLAY
  670. float        TEAM_STUFF_COLOR    = 32;
  671.  
  672. .float        motd_time;
  673. .float        motd_count;
  674.  
  675. .float        suicide_count;
  676. .float        killed;            // have we been killed yet
  677.  
  678. //McBain: PreviousWeaponCommand
  679. .float        previous_weapon;    // one of the IT_SHOTGUN, etc flags
  680.  
  681. //
  682. // object stuff
  683. //
  684. .string        mdl;
  685. .vector        mangle;            // angle at start
  686.  
  687. .vector        oldorigin;        // only used by secret door
  688. .entity        activr;
  689.  
  690. .float        t_length, t_width;
  691.  
  692.  
  693. //
  694. // doors, etc
  695. //
  696. .vector        dest, dest1, dest2;
  697. .float        wait;            // time from firing to restarting
  698. .float        delay;            // time from activation to firing
  699. .entity        trigger_field;    // door's trigger entity
  700. .string        noise4;
  701.  
  702. //
  703. // monsters
  704. //
  705. .float         pausetime;
  706. .entity     movetarget;
  707.  
  708.  
  709. //
  710. // doors
  711. //
  712. .float        aflag;
  713. .float        dmg;            // damage done by door when hit
  714.     
  715. //
  716. // misc
  717. //
  718. .float        cnt;             // misc flag
  719.     
  720. //
  721. // subs
  722. //
  723. .void()        think1;
  724. .vector        finaldest, finalangle;
  725.  
  726. //
  727. // triggers
  728. //
  729. .float        count;            // for counting triggers
  730.  
  731.  
  732. //
  733. // plats / doors / buttons
  734. //
  735. .float        lip;
  736. .float        state;
  737. .vector        pos1, pos2;        // top and bottom positions
  738. .float        height;
  739.  
  740. //
  741. // sounds
  742. //
  743. .float        waitmin, waitmax;
  744. .float        distance;
  745. .float        volume;
  746.  
  747.  
  748.  
  749.  
  750. //===========================================================================
  751.     
  752.  
  753. //
  754. // builtin functions
  755. //
  756.  
  757. void(vector ang)    makevectors        = #1;        // sets v_forward, etc globals
  758. void(entity e, vector o) setorigin    = #2;
  759. void(entity e, string m) setmodel    = #3;        // set movetype and solid first
  760. void(entity e, vector min, vector max) setsize = #4;
  761. // #5 was removed
  762. void() break                        = #6;
  763. float() random                        = #7;        // returns 0 - 1
  764. void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  765. vector(vector v) normalize            = #9;
  766. void(string e) error                = #10;
  767. void(string e) objerror                = #11;
  768. float(vector v) vlen                = #12;
  769. float(vector v) vectoyaw            = #13;
  770. entity() spawn                        = #14;
  771. void(entity e) remove                = #15;
  772.  
  773. // sets trace_* globals
  774. // nomonsters can be:
  775. // An entity will also be ignored for testing if forent == test,
  776. // forent->owner == test, or test->owner == forent
  777. // a forent of world is ignored
  778. void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  779.  
  780. entity() checkclient                = #17;    // returns a client to look for
  781. entity(entity start, .string fld, string match) find = #18;
  782. string(string s) precache_sound        = #19;
  783. string(string s) precache_model        = #20;
  784. void(entity client, string s)stuffcmd = #21;
  785. entity(vector org, float rad) findradius = #22;
  786. void(string s) bprint                = #23;
  787. void(entity client, string s) sprint = #24;
  788. void(string s) dprint                = #25;
  789. string(float f) ftos                = #26;
  790. string(vector v) vtos                = #27;
  791. void() coredump                        = #28;        // prints all edicts
  792. void() traceon                        = #29;        // turns statment trace on
  793. void() traceoff                        = #30;
  794. void(entity e) eprint                = #31;        // prints an entire edict
  795. float(float yaw, float dist) walkmove    = #32;    // returns TRUE or FALSE
  796. // #33 was removed
  797. float(float yaw, float dist) droptofloor= #34;    // TRUE if landed on floor
  798. void(float style, string value) lightstyle = #35;
  799. float(float v) rint                    = #36;        // round to nearest int
  800. float(float v) floor                = #37;        // largest integer <= v
  801. float(float v) ceil                    = #38;        // smallest integer >= v
  802. // #39 was removed
  803. float(entity e) checkbottom            = #40;        // true if self is on ground
  804. float(vector v) pointcontents        = #41;        // returns a CONTENT_*
  805. // #42 was removed
  806. float(float f) fabs = #43;
  807. vector(entity e, float speed) aim = #44;        // returns the shooting vector
  808. float(string s) cvar = #45;                        // return cvar.value
  809. void(string s) localcmd = #46;                    // put string into local que
  810. entity(entity e) nextent = #47;                    // for looping through all ents
  811. void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  812. void() ChangeYaw = #49;                        // turn towards self.ideal_yaw
  813.                                             // at self.yaw_speed
  814. // #50 was removed
  815. vector(vector v) vectoangles            = #51;
  816.  
  817. //
  818. // direct client message generation
  819. //
  820. void(float to, float f) WriteByte        = #52;
  821. void(float to, float f) WriteChar        = #53;
  822. void(float to, float f) WriteShort        = #54;
  823. void(float to, float f) WriteLong        = #55;
  824. void(float to, float f) WriteCoord        = #56;
  825. void(float to, float f) WriteAngle        = #57;
  826. void(float to, string s) WriteString    = #58;
  827. void(float to, entity s) WriteEntity    = #59;
  828.  
  829. //
  830. // broadcast client message generation
  831. //
  832.  
  833. // void(float f) bWriteByte        = #59;
  834. // void(float f) bWriteChar        = #60;
  835. // void(float f) bWriteShort        = #61;
  836. // void(float f) bWriteLong        = #62;
  837. // void(float f) bWriteCoord        = #63;
  838. // void(float f) bWriteAngle        = #64;
  839. // void(string s) bWriteString    = #65;
  840. // void(entity e) bWriteEntity = #66;
  841.  
  842. void(float step) movetogoal                = #67;
  843.  
  844. string(string s) precache_file        = #68;    // no effect except for -copy
  845. void(entity e) makestatic        = #69;
  846. void(string s) changelevel = #70;
  847.  
  848. //#71 was removed
  849.  
  850. void(string var, string val) cvar_set = #72;    // sets cvar.value
  851.  
  852. void(entity client, string s) centerprint = #73;    // sprint, but in middle
  853. void(entity client, string s, string s1, string s2) centerprint3 = #73;    // sprint, but in middle
  854. void(entity client, string s, string s1, string s2, string s4, string s5, string s6, string s7) centerprint7 = #73;
  855.  
  856.  
  857. void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  858.  
  859. string(string s) precache_model2    = #75;        // registered version only
  860. string(string s) precache_sound2    = #76;        // registered version only
  861. string(string s) precache_file2        = #77;        // registered version only
  862.  
  863. void(entity e) setspawnparms        = #78;        // set parm1... to the
  864.                                                 // values at level start
  865.                                                 // for coop respawn
  866. float(float f) createstring        = #79;
  867. void(float f) freestring = #80;
  868. void(float f, string t) strcat = #81;
  869. void(float f, string t) strcpy = #82;
  870. string(float f) getstring = #83;
  871.  
  872. //============================================================================
  873.  
  874. //
  875. // subs.qc
  876. //
  877. void(vector tdest, float tspeed, void() func) SUB_CalcMove;
  878. void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
  879. void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
  880. void()  SUB_CalcMoveDone;
  881. void() SUB_CalcAngleMoveDone;
  882. void() SUB_Null;
  883. void() SUB_UseTargets;
  884. void() SUB_Remove;
  885.  
  886. //
  887. //    combat.qc
  888. //
  889. void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  890.  
  891.  
  892. float (entity e, float healamount, float ignore) T_Heal; // health function
  893.  
  894. float(entity targ, entity inflictor) CanDamage;
  895.  
  896.